package com.zx.work1.service;

import com.zx.work1.Dao.StudentDao;
import com.zx.work1.bean.Student;
import com.zx.work1.factory.StudentDaoFactory;

import java.util.List;

public class StudentService {

    private StudentDao studentDao;
    public StudentService(){
        this.studentDao = StudentDaoFactory.getStudentDao();
    }

    public Student addStudentServeiece(Student student){
        return studentDao.addStudent(student);
    }

    public Student delStudentServeiece(Student student){
        return studentDao.delStudent(student);
    }

    public Student modifyStudentServeiece(Student student){
        return studentDao.modifyStudent(student);
    }

    public List queryStudentServeiece(){
        return studentDao.queryStudent();
    }
    public Student queryStudentNumServeiece(int num){
        return studentDao.queryStudentNum(num);
    }
}
